#pragma once  //!防止头文件被重复包含
#include "ti_msp_dl_config.h"
#include "Bsp.h"

#define RED(X)       GPIO_Set(GPIOB,PIN24,X)                                                                   
#define BLUE(X)      GPIO_Set(GPIOB,PIN25,X)                                                        
#define GREEN(X)     GPIO_Set(GPIOB,PIN22,X)                                                  
#define BEEP(X)      GPIO_Set(GPIOB,PIN13,X)                                                   
#define KEY1         ((GPIOB->DIN31_0 >> 21) & 1)
#define KEY2         ((GPIOB->DIN31_0 >> 20) & 1)

// LED控制抽象层（假设0=亮，1=灭）
#define LED_RED_SET(state)   RED(state)
#define LED_GREEN_SET(state) GREEN(state)
#define LED_BLUE_SET(state)  BLUE(state)

// 颜色枚举定义（避免宏重复，提高类型安全）
typedef enum {
    LED_COLOR_RED = 1,
    LED_COLOR_GREEN,
    LED_COLOR_BLUE,
    LED_COLOR_PURPLE,
    LED_COLOR_YELLOW,
    LED_COLOR_CYAN,
    LED_COLOR_WHITE,
    LED_COLOR_NONE
} LedColor;

void RGB_LED(uint8_t color);
//void Sg(void);